namespace OasisCiq.Xal
{
    using System;
    using System.Linq;
    
    /// <summary>
    /// A list of types of usage of the address
    /// </summary>
    public class AddressUsageList : XS.XSNormalizedString
    {
        private static readonly string[] PossibleValues = new[]
        {
            "Business",
            "Billing",
            "Communication",
            "Contact",
            "Mailing",
            "Personal",
            "Postal",
            "Residential"
        };

        public AddressUsageList(string value)
            : base(value)
        {
            if (!PossibleValues.Contains(value))
            {
                throw new ArgumentOutOfRangeException();
            }
        }
    }
}